package com.study.thread.demo.threadpool;

import java.util.concurrent.RejectedExecutionHandler;
import java.util.concurrent.ThreadPoolExecutor;

/**
 * 自定义拒绝策略
 *
 * @author wuxj
 */
public class IgnorePolicyDemo implements RejectedExecutionHandler {

    @Override
    public void rejectedExecution(Runnable r, ThreadPoolExecutor e) {
        Thread thread = (Thread) r;
        System.out.println("拒绝" + thread.getName());
    }
}
